﻿using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Xml.Linq;
using RuleCode.Table;

namespace map.member
{
    public partial class configshop_position : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                bind2();
            }
        }
        private void bind2()
        {

            if (!IsPostBack)
            {
                string furl = System.Web.HttpContext.Current.Request.Url.Host;
                cbuser u = cbuser.getcuruser();
                string id = u.cbuserid.ToString();
                cbshopcss sc = cbshopcss.findorcreate(id);
                string css = sc.getstylestring();
                Literalcss.Text = css;

                u = cbuser.Find(" cbuserid =  '" + id + "'");
                if (furl == "www.f980.com" || furl == "f980.com" || furl == "localhost")
                {
                    string ret = RuleCode.Util.getmapurl()+"<div id=\"map_canvas\" style=\"width: 100%; height: 300px\"></div>";
                    Literal1.Text = ret;
                    string ScriptTag = "";
                    ScriptTag =
                        "<script type=\"text/javascript\">initialize(" + u.taobaolong.ToString() + ","
                        + u.taobaolat.ToString() + ");</script>";

                    ClientScript.RegisterStartupScript(GetType(), "bodyevent", ScriptTag);
                }
                else
                {
                    string ret = u.省编码.ToString() + "-"
                        + u.区编码.ToString() + "-"
                        + u.区域编码.ToString() + "-"
                        + u.cbUserBizArea.ToString() + "-"
                        + u.cbaddress.ToString();
                    Literal1.Text = ret;
                }
            }
        }
    }
}
